Skip to content

fix(id): petname skeleton — capital-I class and 8->b, labels() skeleton collisions (#2069) - #3360

Merged
dezren39 merged 2 commits into
mainfrom
queue/5073-2069-petname-skeleton
Nov 1, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/5073-2069-petname-skeleton

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Fixes #2069 (queue task 5073; triage task 2949 pins honored).

What changed

pkgs/id/src/petname.rs:

  • skeleton(): fold() lowercases I→i before the map, so mapping post-fold 'i' => 'l' (grouped with '1' | '|') closes the capital-I class — PayPaI now skeletons identically to PayPal. Added '8' => 'b', symmetric with the already-mapped digits 0/1/3/5 — 8ob ≡ Bob.
  • labels(): collision counting key changed fold() → skeleton(), so legacy stored petnames that collide only by look-alike (which set() now refuses) render with fingerprints instead of identically (defense-in-depth, per triage pin 3).

The i/l false-positive cost (a petname differing only by an i/l swap is refused) is the triage-accepted price: skeleton is a refusal heuristic, and 1/| already merge into l.

Tests

New tests beside the existing ones: the_skeleton_maps_capital_i_and_eight_together (PayPaI≡PayPal, AIice≡Alice, 8ob≡Bob), a_capital_i_confusable_name_is_refused, an_eight_confusable_name_is_refused, skeleton_colliding_petnames_both_get_a_fingerprint. Existing corpus (Alice/Bob/Carol, all pkgs/id tests) verified in CI per fleet CI-first policy.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 05:54
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 68b2a095-2750-49c2-88fc-032200f22e28
Commits

Reviewing files that changed from the base of the PR and between ca2471a and d04b8f7.

Files selected for processing: 1
  • pkgs/id/src/petname.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T06:25:36.528124Z d04b8f7 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0a309b05f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pkgs/id/src/petname.rs Resolved
@dezren39

dezren39 commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

@codex review — head d04b8f7 renames the four new tests to the test_ prefix (your P1 on c0a309b, thread replied + resolved). Please re-review the new head.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: d04b8f7ce5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant